home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / WindowMaker / src / icon.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-21  |  2.3 KB  |  76 lines

  1. /*
  2.  *  Window Maker window manager
  3.  * 
  4.  *  Copyright (c) 1997, 1998 Alfredo K. Kojima
  5.  * 
  6.  *  This program is free software; you can redistribute it and/or modify
  7.  *  it under the terms of the GNU General Public License as published by
  8.  *  the Free Software Foundation; either version 2 of the License, or
  9.  *  (at your option) any later version.
  10.  *
  11.  *  This program is distributed in the hope that it will be useful,
  12.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  *  GNU General Public License for more details.
  15.  *
  16.  *  You should have received a copy of the GNU General Public License
  17.  *  along with this program; if not, write to the Free Software
  18.  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
  19.  *  USA.
  20.  */
  21.  
  22.  
  23. #ifndef WMICON_H_
  24. #define WMICON_H_
  25.  
  26. #include "wcore.h"
  27. #include "window.h"
  28. #include "funcs.h"
  29.  
  30.  
  31. #define TILE_NORMAL    0
  32. #define TILE_CLIP    1
  33.  
  34.  
  35. typedef struct WIcon {
  36.     WCoreWindow     *core;
  37.     WWindow         *owner;           /* owner window */
  38.     char         *icon_name;    /* the icon name hint */
  39.  
  40.     Window         icon_win;      /* client suplied icon window */
  41.  
  42.     char        *file;           /* the file with the icon image */
  43.     RImage         *image;
  44.  
  45.     unsigned int     tile_type:4;
  46.     unsigned int     show_title:1;
  47.     unsigned int     has_titlebar:1;
  48.     unsigned int     force_paint:1; /* True for icon update and repaint */
  49.     unsigned int     selected:1;
  50.     unsigned int    step:3;           /* selection cycle step */
  51.     unsigned int    shadowed:1;    /* If the icon is to be blured */
  52.     unsigned int     mapped:1;
  53.     unsigned int    highlighted:1;
  54.  
  55.     Pixmap         pixmap;
  56.     
  57.     WMHandlerID        handlerID;     /* timer handler ID for cycling select
  58.                     * color */
  59. } WIcon;
  60.  
  61. WIcon *wIconCreateWithIconFile(WScreen *scr, char *iconfile, int tile);
  62. WIcon *wIconCreate(WWindow *wwin);
  63. void wIconDestroy(WIcon *icon);
  64. void wIconPaint(WIcon *icon);
  65. void wIconUpdate(WIcon *icon);
  66. void wIconChangeTitle(WIcon *icon, char *new_title);
  67. void wIconChangeImage(WIcon *icon, RImage *new_image);
  68. Bool wIconChangeImageFile(WIcon *icon, char *file);
  69. void wIconSelect(WIcon *icon);
  70.  
  71. RImage *wIconValidateIconSize(WScreen *scr, RImage *icon);
  72.  
  73. char *wIconStore(WIcon *icon);
  74.  
  75. #endif /* WMICON_H_ */
  76.